﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LaozhaoXuexiJi
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            label1.Text = this.textBox1.Text;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button2_MouseMove(object sender, MouseEventArgs e)
        {
            Random rd = new Random();
            int x = this.Width - this.button2.Width;
            int y = this.Height - this.button2.Height;
            this.button2.Location = new Point(rd.Next(0, x), rd.Next(0, y));
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            label2.Text = label2.Text.Substring(1)+label2.Text.Substring(0,1);
        }
    }
}
